/***********************************************
 **** 版权声明处 **
 ****  为了方便阅读和维护，请严格遵守相关代码规范，谢谢   ****
 *******************************************/
package com.hjx.model.business
{
	/*******************************************
	 **** @author huangjixin,@date 2012-7-25, @time 下午2:59:27 **
	 **** 委托层基类  **
	 *******************************************/
	import com.hjx.model.vo.Page;
	
	import mx.rpc.AbstractOperation;
	import mx.rpc.IResponder;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.remoting.mxml.RemoteObject;
	
	public class AbstractGenericServiceDelegate  
	{  
		protected var responder : IResponder;  
		protected var service : Object;  
		
		public function AbstractGenericServiceDelegate(pResponder : IResponder )  
		{  
			service = new RemoteObject(); 
			service.makeObjectsBindable=true;  
			service.showBusyCursor=true; 
			responder = pResponder;
		}     
		
		public function deleteByPrimaryKey(id:int):void  
		{  
			var call:Object = service.deleteByPrimaryKey(id);  
			call.addResponder(responder);  
		}  
		
		public function insert(record:Object):void  
		{  
			var call:Object = service.insert(record);  
			call.addResponder(responder);  
		}  
		
		public function insertSelective(record:Object):void  
		{  
			var call:Object = service.insertSelective(record);  
			call.addResponder(responder);  
		}  
		
		public function selectAll():void  
		{  
			var call:Object = service.selectAll();  
			call.addResponder(responder);  
		}  
		
		public function selectByPage(page:Page):void  
		{  
			var call:Object = service.selectByPage(page);  
			call.addResponder(responder);	
		}
		
		public function selectByPrimaryKey(id:int):void  
		{  
			var call:Object = service.selectByPrimaryKey(id);  
			call.addResponder(responder);  
		}  
		
		public function updateByPrimaryKeySelective(record:Object):void  
		{  
			var call:Object = service.updateByPrimaryKeySelective(record);  
			call.addResponder(responder);  
		}  
		
		public function updateByPrimaryKey(record:Object):void  
		{  
			var call:Object = service.updateByPrimaryKey(record);  
			call.addResponder(responder);  
		}  
		
	} //类结束
}//包结束